import http from '../utils/http'
import type { Post } from '@/model/goods';

// 创建
export const createGoods = (form : Post) => {
	return http.post('/classes/goods', form)

}

// 更新
type UData = 'favorites' | 'comments' | 'likes'
export const goodUpdate = (objectId : string, goodData : Partial<Pick<Post, UData>>) => {
	return http.put(`/classes/goods/${objectId}`, goodData)
}